const loadmore = {
  bind(el) {
    el.addEventListener('click', function() {
      const timer = setInterval(() => {
        const isFocus = document.getElementsByClassName('is-focus')[0];
        if (isFocus === undefined) {
          document.getElementsByClassName('vx-pwd')[0].style.display = 'block';
          clearTimeout(timer);
        } else {
          document.getElementsByClassName('vx-pwd')[0].style.display = 'none';
        }
      }, 10);
    });
  },
  componentUpdated() {
    if (document.getElementsByClassName('vx-pwd')[0] !== undefined) {
      document.getElementsByClassName('vx-pwd')[0].style.display = 'block';
    } else {
      document.getElementsByClassName('vx-pwd')[0].style.display = 'none';
    }
  },
};

export default loadmore;
